package com.demo.flight.mapper;

import com.demo.flight.entity.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ssy
 * @create 2022-03-24 17:41
 */

@Mapper
public interface OrderMapper {
    List<Order> selectAll();
    List<Order> selectAllAvailable();
    List<Order> selectAllNotAvailable();
    
    /**
     * 插入一行订单信息到数据库
     * @param order 订单信息
     */
    void insert(Order order);
    void updateOrderState(@Param("orderId") Integer orderId, @Param("orderAvailable") String orderAvailable);
    
    String selectOrderState(Integer orderId);
}
